<%= form_for @changeset, @action, fn f -> %>
  <%= if @changeset.action do %>
    <div class="alert alert-danger">
      <p>Oops, something went wrong! Please check the errors below.</p>
    </div>
  <% end %>

  <div class="panel panel-default">
    <div class="panel-heading">基本信息</div>
    <div class="panel-body">
      <div class="form-group address-select-cc">
        <%= label f, :name, "名字", class: "control-label" %>
        <%= text_input f, :name, class: "form-control" %>
        <%= error_tag f, :name %>
        <ul class="address-select-c collapse">
        </ul>
      </div>

      <div class="form-group">
        <%= label f, :address, "地址", class: "control-label" %>
        <%= text_input f, :address, class: "form-control" %>
        <%= error_tag f, :address %>
      </div>

      <div class="form-group form-inline">
        <div class="form-group">
          <%= label f, :gps, "GPS", class: "control-label" %>
          <div class="input-group">
            <%= text_input f, :gps, class: "form-control" %>
            <span class="input-group-btn">
              <button type="button" class="get-gps btn btn-default" id="load" data-loading-text="Loading..."> 获取
              </button>
            </span>
          </div>
          <%= error_tag f, :gps %>
        </div>
      </div>

      <div class="form-group form-inline">
        <div class="form-group">
          <%= label f, :area, "面积", class: "control-label" %>
          <%= number_input f, :area, step: "any", class: "form-control" %>
          <%= error_tag f, :area %>
        </div>

        <div class="form-group">
          <%= label f, :price, "价格", class: "control-label" %>
          <%= number_input f, :price, step: "any", class: "form-control" %>
          <%= error_tag f, :price %>
        </div>

        <div class="form-group">
          <%= label f, :fee, "其他费用", class: "control-label" %>
          <%= number_input f, :fee, step: "any", class: "form-control" %>
          <%= error_tag f, :fee %>
        </div>

    </div>

    <div class="form-group form-inline">
        <div class="form-group">
          <%= label f, :year, "年份", class: "control-label" %>
          <%= number_input f, :year, class: "form-control" %>
          <%= error_tag f, :year %>
        </div>

        <div class="form-group">
          <%= label f, :floor, "楼层", class: "control-label" %>
          <%= text_input f, :floor, class: "form-control" %>
          <%= error_tag f, :floor %>
        </div>
      </div>

      <div class="form-group">
        <%= label f, :service, "物业情况", class: "control-label" %>
        <%= text_input f, :service, class: "form-control" %>
        <%= error_tag f, :service %>
      </div>

      <div class="form-group">
        <%= label f, :summary, "简介", class: "control-label" %>
        <%= textarea f, :summary, class: "form-control" %>
        <%= error_tag f, :summary %>
      </div>

      <div class="form-group">
        <%= label f, :stop, "停车情况", class: "control-label" %>
        <%= text_input f, :stop, class: "form-control" %>
        <%= error_tag f, :stop %>
      </div>

      <div class="form-group">
        <%= label f, :around, "周边", class: "control-label" %>
        <%= text_input f, :around, class: "form-control" %>
        <%= error_tag f, :around %>
      </div>
    </div>
  </div>



  <div class="panel panel-default">
    <div class="panel-heading">关注点</div>
    <div class="panel-body">
      <div class="form-group form-inline">
        <div class="form-group">
          <%= label f, :terrace, "露台大小", class: "control-label" %>
          <%= number_input f, :terrace, step: "any", class: "form-control" %>
          <%= error_tag f, :terrace %>
        </div>

        <div class="form-group">
          <%= label f, :kitchen, "厨房大小", class: "control-label" %>
          <%= number_input f, :kitchen, step: "any", class: "form-control" %>
          <%= error_tag f, :kitchen %>
        </div>
      </div>


      <div class="form-group form-inline">
        <div class="form-group">
          <%= label f, :bedroom, "卧室大小", class: "control-label" %>
          <%= number_input f, :bedroom, step: "any", class: "form-control" %>
          <%= error_tag f, :bedroom %>
        </div>

        <div class="form-group">
          <%= label f, :livingroom, "客厅大小", class: "control-label" %>
          <%= number_input f, :livingroom, step: "any", class: "form-control" %>
          <%= error_tag f, :livingroom %>
        </div>
      </div>

      <div class="form-group">
        <%= label f, :sunshine, "光照", class: "control-label" %>
        <%= text_input f, :sunshine, class: "form-control" %>
        <%= error_tag f, :sunshine %>
      </div>

      <div class="form-group">
        <%= label f, :noise, "噪音", class: "control-label" %>
        <%= text_input f, :noise, class: "form-control" %>
        <%= error_tag f, :noise %>
      </div>

      <div class="form-group">
        <%= label f, :fitment, "装修情况", class: "control-label" %>
        <%= text_input f, :fitment, class: "form-control" %>
        <%= error_tag f, :fitment %>
      </div>

      <div class="form-group">
        <%= label f, :traffic, "交通", class: "control-label" %>
        <%= text_input f, :traffic, class: "form-control" %>
        <%= error_tag f, :traffic %>
      </div>

      <div class="form-group">
        <%= label f, :heating, "供暖", class: "control-label" %>
        <%= text_input f, :heating, class: "form-control" %>
        <%= error_tag f, :heating %>
      </div>
    </div>
  </div>




  <div class="panel panel-default">
    <div class="panel-heading">其他信息</div>
    <div class="panel-body">
      <div class="form-group">
        <%= label f, :investment, "投资情况", class: "control-label" %>
        <%= text_input f, :investment, class: "form-control" %>
        <%= error_tag f, :investment %>
      </div>

      <div class="form-group">
        <%= label f, :license, "证件是否齐全", class: "control-label" %>
        <%= text_input f, :license, class: "form-control" %>
        <%= error_tag f, :license %>
      </div>

      <div class="form-group">
        <%= label f, :loan, "贷款方式", class: "control-label" %>
        <%= text_input f, :loan, class: "form-control" %>
        <%= error_tag f, :loan %>
      </div>
    </div>
  </div>

  <div class="form-group foot-submiter">
    <%= submit "Submit", class: "btn btn-primary btn-block" %>
  </div>
<% end %>
